package com.atguigu.gmall.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created on 2021/10/30.
 *
 * @author ${AUTHOR}
 */
@RestController
@Slf4j
public class FirstController {
    //通过requestMapping匹配请求并交给方法处理
    @RequestMapping("/testDemo")
    public String test(@RequestParam("name") String nn,
                       @RequestParam("age") int age) {
        System.out.println(nn + ":" + age);
        return "success";
    }
/*    @RequestMapping("/applog")
    public String getLogger(@RequestParam("param") String jsonStr) {
        //将数据落盘
        //System.out.println(jsonStr);
        log.error(jsonStr);
        //将数据发送至Kafka ODS主题
        //kafkaTemplate.send("ods_base_log", jsonStr);
        return "success";
    }*/


}
